<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
    </head>
    <body>
        <?php
        // put your code here
        var_dump($_POST);
        echo"<br>";
        $uname=$_POST["uname"];
        $pwd=$_POST["pwd"];
        $Email=$_POST["Email"];
        
        $link= myspli_connect("localhost","root");
        mysqli_select_db($link,"nhcar");
        mysqli_set_charset($link,"utf8");
        
        $sql="insert into users(uname,upwd,uemail)values('$uname','$pwd','$Email')";
        $result= mysqli_query($link,$sql);
        
        if($result){
            header("Location:login.php");
        }else{
            header("Location:register.php");
        }
        ?>
    </body>
</html>
